package com.alisls.shequtao.service.user.service;

import com.alisls.shequtao.service.user.dto.UserDTO;
import com.alisls.shequtao.service.user.entity.UserDO;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * 用户Service
 *
 * @author Ke Wang
 */
public interface UserService extends IService<UserDO> {

    UserDTO getUser(Long id);

    UserDTO getUser(String username);

    UserDTO getUserWithPwd(String username);

    /**
     * 获取用户菜单权限
     * 1.用户本身的菜单权限
     * 2.用户所有角色对应的菜单权限
     * 3.用户所有角色对应权限组内的菜单权限
     * 4.用户所在用户组对应的菜单权限
     * @param username
     * @return 用户的菜单权限
     */
    UserDTO getUserMenuPermissions(String username);

    UserDTO save(UserDTO userDTO);

    UserDTO update(UserDTO userDTO);

}
